package com.YHVision.qiuzhike.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.YHVision.qiuzhike.model.dto.companyQuestion.CompanyQuestionQueryRequest;
import com.YHVision.qiuzhike.model.entity.CompanyQuestion;
import com.YHVision.qiuzhike.model.vo.CompanyQuestionVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 企业问题关联服务
 *
 * @author <a href="">YHVision-小y</a>
 * @from <a href="todo">爱编程学习圈</a>
 */
public interface CompanyQuestionService extends IService<CompanyQuestion> {

    /**
     * 校验数据
     *
     * @param companyQuestion
     * @param add 对创建的数据进行校验
     */
    void validCompanyQuestion(CompanyQuestion companyQuestion, boolean add);

    /**
     * 获取查询条件
     *
     * @param companyQuestionQueryRequest
     * @return
     */
    QueryWrapper<CompanyQuestion> getQueryWrapper(CompanyQuestionQueryRequest companyQuestionQueryRequest);
    
    /**
     * 获取企业问题关联封装
     *
     * @param companyQuestion
     * @param request
     * @return
     */
    CompanyQuestionVO getCompanyQuestionVO(CompanyQuestion companyQuestion, HttpServletRequest request);

    /**
     * 分页获取企业问题关联封装
     *
     * @param companyQuestionPage
     * @param request
     * @return
     */
    Page<CompanyQuestionVO> getCompanyQuestionVOPage(Page<CompanyQuestion> companyQuestionPage, HttpServletRequest request);
}
